package com.ding.es.service.impl;

import com.ding.es.entity.Film;
import com.ding.es.mapper.FimlMapper;
import com.ding.es.service.FimlService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @author ding
 * @date 2021/8/22 16:48
 */

@Service
public class FimlServiceImpl implements FimlService {
    @Resource
    private FimlMapper fimlMapper;


    @Override
    public void insertBatch(ArrayList<Film> films) {
        fimlMapper.saveAll(films);
    }

    @Override
    public List<Film> queryAll() {
        return fimlMapper.findAll();
    }
}
